﻿using AutoMapper;
using Domain.Entity;
using Domain.Repository;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Application.CPCService
{
    public class CPCService : ICPCService
    {
        private readonly IMapper mapper;
        public ICPCRepository CPCRepository { get; set; }


        public CPCService(IMapper mapper, ICPCRepository CPCRepository)
        {
            this.mapper = mapper;
            this.CPCRepository = CPCRepository;

        }
        public Task<int> AddCPC(CPC cPC)
        {
            return CPCRepository.AddCPC(cPC);
        }

        public Task<int> DeleteCPC(int id)
        {
            return CPCRepository.DeleteCPC(id);
        }

        public List<CPC> GetCPC()
        {
            return CPCRepository.GetCPC();
        }
    }
}
